% Main_1


fname = "D:\Desktop\mOP2\test\FourCQUAD4_Static.op2"
fname = "G:\Backup\Desktop\Xdd\Model_NoChangeKM\Nastran_calu_0_10s\0516_x_norenum_222.op2"
fname = "D:\Desktop\HM_OP2\FourCQUAD4_Static_2CASE_OES.op2"
op2 = mOP2read(fname, 'mat');

% Find OES block (table of stresses or strains)
iBlock_OES = [];
for iBlock = 1:length(op2.blocks)
	if isa(op2.blocks(iBlock).block, 'mOP2block_OES')
		iBlock_OES = [iBlock_OES(:), iBlock];
		fprintf(1, "%d stresses/strains results found\n", length(op2.blocks(iBlock).block.data))
		fprintf(1, "#\tSUBCASE\tFREQ\tELTYPE\n")
		for iResult = 1:length(op2.blocks(iBlock).block.data)
			if isfield(op2.blocks(iBlock).block.data(iResult), 'FREQ')
				fprintf(1, "%d\t%d\t%g Hz\t%s\n", iResult, op2.blocks(iBlock).block.data(iResult).SUBCASE, op2.blocks(iBlock).block.data(iResult).FREQ, mOP2_eltype_human(op2.blocks(iBlock).block.data(iResult).ELTYPE))
			end
		end
	end
end